/*
 Navicat Premium Data Transfer

 Source Server         : LocalDB
 Source Server Type    : SQL Server
 Source Server Version : 15004153
 Source Host           : (localdb)\MSSQLLocalDB:1433
 Source Catalog        : OcelotSettings
 Source Schema         : dbo

 Target Server Type    : SQL Server
 Target Server Version : 15004153
 File Encoding         : 65001

 Date: 07/07/2023 17:31:22
*/


-- ----------------------------
-- Table structure for SettingBak
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[SettingBak]') AND type IN ('U'))
	DROP TABLE [dbo].[SettingBak]
GO

CREATE TABLE [dbo].[SettingBak] (
  [Id] int  IDENTITY(1,1) NOT NULL,
  [BakTime] datetime  NOT NULL,
  [BakJson] varchar(max) COLLATE Chinese_PRC_CI_AS  NOT NULL,
  [Remark] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [ConsulKey] varchar(255) COLLATE Chinese_PRC_CI_AS  NOT NULL,
  [ConsulDc] varchar(20) COLLATE Chinese_PRC_CI_AS  NOT NULL
)
GO

ALTER TABLE [dbo].[SettingBak] SET (LOCK_ESCALATION = TABLE)
GO

EXEC sp_addextendedproperty
'MS_Description', N'主键Id',
'SCHEMA', N'dbo',
'TABLE', N'SettingBak',
'COLUMN', N'Id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'备份时间',
'SCHEMA', N'dbo',
'TABLE', N'SettingBak',
'COLUMN', N'BakTime'
GO

EXEC sp_addextendedproperty
'MS_Description', N'备份内容',
'SCHEMA', N'dbo',
'TABLE', N'SettingBak',
'COLUMN', N'BakJson'
GO

EXEC sp_addextendedproperty
'MS_Description', N'备注',
'SCHEMA', N'dbo',
'TABLE', N'SettingBak',
'COLUMN', N'Remark'
GO

EXEC sp_addextendedproperty
'MS_Description', N'配置备份表',
'SCHEMA', N'dbo',
'TABLE', N'SettingBak'
GO


-- ----------------------------
-- Auto increment value for SettingBak
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[SettingBak]', RESEED, 47)
GO


-- ----------------------------
-- Primary Key structure for table SettingBak
-- ----------------------------
ALTER TABLE [dbo].[SettingBak] ADD CONSTRAINT [PK__Bak__3214EC07834029D2] PRIMARY KEY CLUSTERED ([Id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO

